<template>
  <div>
    <!-- tree-table 表格-->
    <TreeTable :data="cateList" :columns="columns" :selection-type="false" :expand-type="false" show-index border>
      <!-- 是否有效-->
      <template slot="action" slot-scope="scope">
        <el-button-group>
          {{scope.row}}
          <el-button icon="el-icon-edit" circle></el-button>
          <el-button icon="el-icon-delete" type="danger" circle></el-button>
        </el-button-group>
      </template>
    </TreeTable>

  </div>
</template>

<script>
  export default {
    data() {
      return {
        cateList: [{
          "cat_id": 1,
          "cat_name": "招生管理",
          "desc": "招生相关管理",
          "cat_pid": 0,
          "cat_level": 0,
          "cat_deleted": false,
          "children": [{
              "cat_id": 6,
              "cat_name": "曲面电视",
              "cat_pid": 3,
              "cat_level": 2,
              "cat_deleted": false
            },
            {
              "cat_id": 7,
              "cat_name": "海信",
              "cat_pid": 3,
              "cat_level": 2,
              "cat_deleted": false
            }
          ]
        }],
        columns: [{
            label: '分类名称',
            prop: 'cat_name'
          },
          {
            label: "权限说明",
            prop: 'desc'
          },
          {
            label: "排序",
            prop: "order"
          },
          {
            label: "相关操作",
            prop: 'action',
            type: "template",
            template: "action",
            width: '200px',
            align: 'center'
          }
        ]
      }
    },
    methods: {

    }
  }
</script>

<style>
</style>
